package team.first.movieapiv2pro.doc;

import dev.morphia.annotations.Entity;
import dev.morphia.annotations.Id;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.bson.types.ObjectId;
/**
 * @Author: HAPPY
 * @Project_name: project
 * @Package_name: team.first.mongodb
 * @Date: 2021/11/18 17:27
 * @Description：
 */

/**
 * Entity表示他是mongo里的一个文档
 * value 指定集合名称
 * useDiscriminator 是否在集合中插入当前的类名
 */
@Entity(value = "region", useDiscriminator = false)
@ToString
@Accessors(chain = true)
@Getter
@Setter
@ApiModel("电影地区文档")
public class RegionDoc {
    @Id
    @ApiModelProperty(value = "文档对象", example = "619f48fae2f3f25894660f70")
    private ObjectId objId;

    @ApiModelProperty(value = "类型编号", example = "1")
    private Integer id;

    @ApiModelProperty(value = "类型名", example = "剧情")
    private String name;


}
